/* 
 * File:   StackMemento.cpp
 * Author: Gab'z
 * 
 * Created on 29 mai 2012, 10:41
 */

#include "StackMemento.h"
#include "../command/UndoableRedoableCommand.h"

namespace calculator {

    StackMemento::StackMemento(UndoableRedoableCommand* undoableRedoableCommand,
            const Stack* stack) :
    Memento(undoableRedoableCommand),
    _stack(stack) {
    }

    StackMemento::StackMemento(const StackMemento& memento) :
    Memento(memento._undoableRedoableCommand),
    _stack(memento._stack) {
    }

    StackMemento::~StackMemento() {
        delete _stack;
    }
}
